package com.info.zhiduoduo.repository.mapper.project;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.info.zhiduoduo.repository.entity.project.ProjectFileRecord;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author tianyonghong
 * @create 2022/7/29
 */
public interface ProjectFileRecordMapper extends BaseMapper<ProjectFileRecord> {
    @Select("SELECT * FROM `zdd_project_file_record` " +
            "WHERE compid = #{compId} " +
            "AND project_type = #{projectType} " +
            "AND source_file_name = #{filename}  " +
            "AND DATE_FORMAT(created_time,'%Y-%m-%d') = #{data} ")
    List<ProjectFileRecord> onTheDayCheckFileExist(@Param("projectType") int projectType,
                                                   @Param("compId") Integer compId,
                                                   @Param("filename") String filename,
                                                   @Param("data") String data);
}
